<%@ page import="util.StudentUtil" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div align="center">
    <h1>学生信息展示</h1>
    <a href="insert.jsp">增加</a>        
    <span>用户：<%=session.getAttribute("sno")%></span>        
    <span>浏览量：<%=application.getAttribute("count")%></span>
</div>
<table align="center" border="1" width="40%">
    <tr align="center">
        <td>学号</td>
        <td>密码</td>
        <td>姓名</td>
        <td>操作</td>
    </tr>
    <%
        for(String s: StudentUtil.map.keySet()){%>
    <tr align="center">
        <td><%=StudentUtil.map.get(s).getSno()%></td>
        <td><%=StudentUtil.map.get(s).getPassword()%></td>
        <td><%=StudentUtil.map.get(s).getName()%></td>
        <td><a href="update.jsp?sno=<%=StudentUtil.map.get(s).getSno()%>&&password=<%=StudentUtil.map.get(s).getPassword()%>&&name=<%=StudentUtil.map.get(s).getName()%>">修改</a>
            <a href="DeleteServlet?sno=<%=StudentUtil.map.get(s).getSno()%>">删除</a></td>
    </tr>
    <% } %>
</table>
</body>
</html>